<template>
  <div class="container-fluid">
    <div class="container">
      <div class="con-left">
        <h4 style="font-weight: bold;font-size: 20px;">项目文档</h4>
        <p style="font-size:13px">
          <a href="http://localhost:8080/index">主页</a> »
          <a href="http://localhost:8080/dpx">SAP项目资料</a>
        </p>
      </div>
      <div class="con-right" style="width:200px;height:10px">
        <el-input placeholder="搜索本站SAP资料" size="mini">
          <el-button slot="append" size="mini">Go!</el-button>
        </el-input>
      </div>
    </div>
    <!-- <hr /> -->
    <!-- 项目资料内容部分 -->
    <div class="con-nr">
      <div class="con-bottom">
        <div
          class="con-bottom-left"
          style="padding: 0px;margin: 0px;position: relative;left: 20px;height: 1492px;width:850px"
        >
          <!-- 制造业项目资料及解决方案 -->
          <div
            class="con-bottom-left-1"
            style="margin: 0px;padding: 5px;position: absolute;left: 0px;top: 0px;"
          >
            <a href="./info_01">
              <h5>制造业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[0]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 汽车零配件项目资料及解决方案 -->
          <div
            class="con-bottom-left-2"
            style="margin: 0px; padding: 5px; position: absolute; left: 285px; top: 0px;"
          >
            <a href="./info_02">
              <h5>汽车零配件项目资料及解决方案</h5>
              <p v-for="(item,index) in list[1]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 电力行业项目资料及解决方案  -->
          <div
            class="con-bottom-left-3"
            style="margin: 0px; padding: 5px; position: absolute; left: 570px; top: 0px;"
          >
            <a href="./info_03">
              <h5>电力行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[2]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 化工行业项目资料及解决方案 -->
          <div
            class="con-bottom-left-4"
            style="margin: 0px; padding: 5px; position: absolute; left: 285px; top: 234px;"
          >
            <a href="./info_04">
              <h5>化工行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[4]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 金属材料行业项目资料及解决方案 -->
          <div
            class="con-bottom-left-5"
            style="margin: 0px; padding: 5px; position: absolute; left: 570px; top: 324px;"
          >
            <a href="./info_06">
              <h5>食品餐饮项目资料</h5>
              <p v-for="(item,index) in list[5]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 食品餐饮项目资料 -->
          <div
            class="con-bottom-left-6"
            style="margin: 0px; padding: 5px; position: absolute; left: 0px; top: 344px;"
          >
            <a href="./info_05">
              <h5>金属材料行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[3]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 制药行业项目资料及解决方案 -->
          <div
            class="con-bottom-left-7"
            style="margin: 0px; padding: 5px; position: absolute; left: 570px; top: 439px;"
          >
            <a href="./info_07">
              <h5>制药行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[8]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 服装行业项目资料及解决方案 -->
          <div
            class="con-bottom-left-8"
            style="margin: 0px; padding: 5px; position: absolute; left: 0px; top: 583px;"
          >
            <a href="./info_08">
              <h5>服装行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[6]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 物流运输行业项目资料及解决方案 -->
          <div
            class="con-bottom-left-9"
            style="margin: 0px; padding: 5px; position: absolute; left: 285px; top: 599px;"
          >
            <a href="./info_09">
              <h5>物流运输行业项目资料及解决方案</h5>
              <p v-for="(item,index) in list[7]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 航空航天解决方案 -->
          <div
            class="con-bottom-left-10"
            style="margin: 0px; padding: 5px; position: absolute; left: 570px; top: 663px;"
          >
            <a href="./info_10">
              <h5>航空航天解决方案</h5>
              <p v-for="(item,index) in list[9]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 房地产行业项目资料 -->
          <div
            class="con-bottom-left-11"
            style="margin: 0px; padding: 5px; position: absolute; left: 0px; top: 818px;"
          >
            <a href="./info_11">
              <h5>房地产行业项目资料</h5>
              <p v-for="(item,index) in list[10]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 零售商超项目资料及解决方案 -->
          <div
            class="con-bottom-left-12"
            style="margin: 0px; padding: 5px; position: absolute; left: 570px; top: 828px;"
          >
            <a href="./info_12">
              <h5>零售商超项目资料及解决方案</h5>
              <p v-for="(item,index) in list[11]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 家具行业项目资料 -->
          <div
            class="con-bottom-left-13"
            style="margin: 0px; padding: 5px; position: absolute; left: 0px; top: 932px;"
          >
            <a href="./info_13">
              <h5>家具行业项目资料</h5>
              <p v-for="(item,index) in list[12]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 石油石化项目资料及解决方案 -->
          <div
            class="con-bottom-left-14"
            style="margin: 0px; padding: 5px; position: absolute; left: 285px; top: 993px;"
          >
            <a href="./info_14">
              <h5>石油石化项目资料及解决方案</h5>
              <p v-for="(item,index) in list[14]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!-- 汽车整车项目资料及解决方案 -->
          <div
            class="con-bottom-left-15"
            style="margin: 0px; padding: 5px; position: absolute; left: 0px; top: 1067px;"
          >
            <a href="./info_15">
              <h5>汽车整车项目资料及解决方案</h5>
              <p v-for="(item,index) in list[13]" :key="index">{{item.content}}</p>
            </a>
          </div>
          <!--  医院医疗项目资料及解决方案 -->
          <div
            class="con-bottom-left-16"
            style="margin: 0px; padding: 5px; position: absolute; left: 285px; top: 1288px;"
          >
            <a href="./info_16">
              <h5>医院医疗项目资料及解决方案</h5>
              <p v-for="(item,index) in list[15]" :key="index">{{item.content}}</p>
            </a>
          </div>
        </div>
        <!-- 右侧部分图书标签 -->
        <div class="col-right" style="padding:5px 0px 10px 0px;">
          <div class="col-right-01">
            <div
              class="col-right-02"
              style="margin-bottom:5px;padding:5px 5px 10px 5px;border-bottom-style:solid;border-bottom-color:#e7e7e7;border-bottom-width:1px;"
            >
              <span
                style="padding-bottom:10px;margin-bottom:-10px;border-bottom-color:#f98181;border-bottom-style:solid;border-bottom-width:2px;font-size:14px"
              >图书标签</span>
            </div>
            <div class="eBook-label">
              <span
                v-for="(item, index) in bookLabel"
                :key="index"
                :class="['pad', 'label', csLabel(index)]"
              >
                {{item.txt}}
                <span class="badge">{{item.num}}</span>
              </span>
            </div>
          </div>
        </div>
      </div>
      <!-- 友情链接 -->
      <div
        class="yq-right"
        style="margin:10px 0px 0px 0px;padding:0px 4px 4px 4px;background-color:#fff;border:solid;border-color:#e7e7e7;border-width:1px"
      >
        <div
          class="yq-right-01"
          style="margin-bottom:5px;padding:5px 5px 10px 5px;border-bottom-style:solid;border-bottom-color:#e7e7e7;border-bottom-width:1px"
        >
          <span
            style="padding-bottom:10px;margin-bottom:-10px;border-bottom-color:#f98181;border-bottom-style:solid;border-bottom-width:2px;font-size:14px"
          >友情链接</span>
        </div>
        <div class="yq-right-02" style="padding:2px 10px 2px 10px">
          <i class="el-icon-paperclip">javaweb开发者社区</i>
        </div>
      </div>
    </div>
    <!-- 底部 -->
    <div
      class="bottom-dd"
      style="color:#999999; font-family: Microsoft YaHei;text-align:center;font-size: 14px;"
    >
      本站所有电子书全部来自于互联网，欢迎大家给小编投稿+V:FICODK
      <p style="color:#999999; font-family: Microsoft YaHei; text-align:center;font-size: 14px;">
        © 2018 All Rights Reserved by SAPDOC.cn. |
        <a
          href
          style="color: #e5e5e5;  font-size: 14px;"
        >沪ICP备17005776号-3</a>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      bookLabel: []
    };
  },
  methods: {
    async getData() {
      const { data: res } = await this.$axios.get("/info");

      // 切割list表数据
      for (let i = 1; i < 17; i++) {
        let jie = res.data.list.filter(item => item.mId == i);
        this.list.push(jie);
        // console.log(jie);
      }
    },
    // 彩色标签
    csLabel(n) {
      n = n % 6;
      switch (n) {
        case 0:
          return "label-default";
        case 1:
          return "label-primary";
        case 2:
          return "label-success";
        case 3:
          return "label-info";
        case 4:
          return "label-warning";
        case 5:
          return "label-danger";
      }
    },
    // 获取数据
    async getGod() {
      const { data: res } = await this.$axios.get("/eLabel");
      this.bookLabel = res.data.list;
      // console.log(res);
    }
  },
  created() {
    this.getData();
    this.getGod();
  }
};
</script>

<style lang="less" scoped>
.container {
  margin-right: auto;
  margin-left: auto;
  width: 1170px;
}

p {
  line-height: 0px;
  margin: 0 0 10px;
}
a {
  color: #333;
  text-decoration: none;
}
.navbar-right {
  float: right;
  margin-right: -15px;
}
.navbar-form {
  width: auto;
  border: 0;
  margin-left: 0;
  margin-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  box-shadow: none;
}
.con-right {
  position: relative;
  top: -60px;
  left: 940px;
}
.con-nr {
  width: 100%;
  height: 100%;
  background-color: #fcf8e3;
  border-top: 1px solid;
  border-top-color: #e7e7e7;
}
.con-bottom {
  margin-right: auto;
  margin-left: auto;
  position: relative;
  top: 10px;
  width: 1170px;
  height: 100%;
}
.con-bottom-left-1 {
  width: 275px;
  height: 335px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-2 {
  width: 275px;
  height: 225px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-3 {
  width: 275px;
  height: 315px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-4 {
  width: 275px;
  height: 355px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-5 {
  width: 275px;
  height: 105px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-6 {
  width: 275px;
  height: 229px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-7 {
  width: 275px;
  height: 215px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-8 {
  width: 275px;
  height: 225px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-9 {
  width: 275px;
  height: 375px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-10 {
  width: 275px;
  height: 155px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-11 {
  width: 275px;
  height: 105px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-12 {
  width: 275px;
  height: 555px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-13 {
  width: 275px;
  height: 125px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-14 {
  width: 265px;
  height: 275px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-15 {
  width: 275px;
  height: 405px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-16 {
  width: 275px;
  height: 165px;
  background-color: #ffffff;
  border-radius: 4px;
  border: 1px solid;
  border-color: #dddddd;
  float: left;
}
.con-bottom-left-1:hover {
  background-color: #f5f5f5;
}

.con-bottom-left-2:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-3:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-4:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-5:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-6:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-7:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-8:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-9:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-10:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-11:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-12:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-13:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-14:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-15:hover {
  background-color: #f5f5f5;
}
.con-bottom-left-16:hover {
  background-color: #f5f5f5;
}

h5 {
  position: relative;
  top: 5px;
  left: 15px;
  font-size: 16px;
}
div p {
  margin-left: 15px;
  line-height: 20px;
  // margin-top: 2px;
  font-size: 12px;
}
.col-right {
  width: 285px;
  height: 410px;
  float: right;
  margin-top: -1491px;
  border: 1px solid;
  border-color: #e7e7e7;
  background-color: #ffffff;
}
.col-right-02 {
  font-size: 14px;
  font-weight: bold;
}
.yq-right {
  width: 285px;
  height: 79px;
  font-size: 14px;
  font-weight: bold;
  float: right;
  position: relative;
  top: -1070px;
  // left: -160px;
  left: -177px;
}
/******** 图书标签 */
.eBook-label {
  width: 100%;
  height: 100%;
  padding-left: 5px;

  span.pad {
    display: inline-block;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 400;
    margin-right: 3px;
  }

  span.badge {
    display: inline-block;
    min-width: 8px;
    padding: 2px 5px;
    font-size: 10px;
    font-weight: bold;
    color: #808080;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    background-color: #fff;
    border-radius: 10px;
  }
}
.bottom-dd {
  width: 100%;
  height: 100px;
  background-color: #2e2e2e;
  padding: 20px 165px;
}

.container-fluid {
  padding-left: 0;
  padding-right: 0;
}
</style>